package com.lsu.app.bean;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import javax.validation.constraints.NotNull;

import java.io.Serializable;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModelProperty;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import org.springframework.web.multipart.MultipartFile;

/**
 * 课程
 * @Date 2023-10-18 20:26:09
 * @author hjj
 */
@Data
@TableName("course")
@ApiModel(value="Course对象", description="课程")
public class Course implements Serializable {

    @ApiModelProperty("#id")
    private Integer id;

    @NotBlank(message="[课程名]不能为空")
    @Size(max= 64,message="编码长度不能超过64")
    @ApiModelProperty("课程名")
    private String courseName;


    @ApiModelProperty("#教师id")
    private Integer teacherId;

    @TableField(exist = false) //该字段不存在于数据库中
    @ApiModelProperty("#教师名称")
    private String teacherName;

    @TableField(exist = false) //该字段不存在于数据库中
    @ApiModelProperty("#教师头像")
    private String teacherImgUrl;

    @Size(max= 255,message="编码长度不能超过255")
    @ApiModelProperty("课程描述")
    private String courseRemake;

    @ApiModelProperty("#课程进度集数")
    private Integer courseProgress;

    @ApiModelProperty("#创建时间")
    private String createTime;

    @ApiModelProperty("#更新时间")
    private String updateTime;

    @ApiModelProperty("#点击次数")
    private Integer clickNum;

    @TableField(exist = false) //该字段不存在于数据库中
    @ApiModelProperty("课程类别名数组")
    private String[] kindName;

    @TableField(exist = false) //该字段不存在于数据库中
    @Size(max= 64,message="编码长度不能超过64")
    @ApiModelProperty("#封面图片地址")
    private String coverImgUrl;


    @ApiModelProperty("#热度（点赞数）")
    private Integer heat;

    @TableField(exist = false) //该字段不存在于数据库中
    @ApiModelProperty("#评论数")
    private Integer responds;

    @ApiModelProperty("#状态（0未完结（默认），1已完结）")
    private Integer state;

    @TableField(exist = false) //该字段不存在于数据库中
    @ApiModelProperty("#自身是否点赞（0未点赞，1点赞）")
    private Integer selfLike;

    @TableField(exist = false) //该字段不存在于数据库中
    @ApiModelProperty("#自身是否已收藏（0未收藏，1已收藏）")
    private Integer selfCollect;

    public Course() {
    }

    public Course(String courseName, Integer teacherId, String courseRemake, String createTime, String updateTime) {
        this.courseName = courseName;
        this.teacherId = teacherId;
        this.courseRemake = courseRemake;
        this.createTime = createTime;
        this.updateTime = updateTime;
    }
}

